package cn.webrx;

import java.io.BufferedReader;
import java.io.FileReader;

public class BufferedStream2 {
    public static void main(String[] args) {
        String f = "C:\\javase2203\\ch09\\src\\cn\\webrx\\Dir1.java";
        try (var r = new BufferedReader(new FileReader(f))) {
            int rows = 0;
            while (r.ready()) {
                System.out.printf("%2$d、%1$s%n", r.readLine(), ++rows);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
